<?php TPL::output('global/header.tpl.htm'); ?>

  <div class="i_bd mainElem i_clear i_allbg">
    <div class="i_left L_sidebar">
    	
        <!--我的收藏_s-->
        <div class="b_restrain">
        	<h4  class="latest_trendst_h3 q_qusAll i_prl q_content_h3 ">我的收藏</h4>
        	
        	<?php if (sizeof($this->favorite_tags) > 0) { ?>
            <div class="sC_collectFloating i_prl">
            	<span class="sC_all i_pas">标签</em></span>
                <p class="sC_list">
                <?php foreach ($this->favorite_tags AS $key => $val) { ?>
                    <span><a href="favorite/tag-<?php echo urlencode($val['title']); ?>" class="i_glotopic"><?php echo $val['title']; ?></a></span>
                <?php } ?>
                </p>
            </div>
            <?php } ?>
            
            
			<?php if (sizeof ($this->list) > 0) { ?>
			<div id="sC_list">
			<?php foreach ($this->list AS $key => $val) { ?>
			<!--内容模块_s-->
			<div class="S_module" style ="height:60px;">
			  
			  <div id ="question_info_view">
			  
			  	<div style ="width:120px;height:50px;float:left"><img alt="<?php echo $val['question_content']; ?>" src="<?php echo $val['question_img_url']; ?>"></div>
			  
			   <div style ="width:110px;height:30px; float:left;"><h4><a class="blank_link" href="question/<?php echo $val['question_id']; ?>"><?php echo $val['question_content']; ?></a></h4></div> 
			   <div style ="height:30px;"><a class="blank_link" href="question/<?php echo $val['question_id']; ?>"><?php echo $val['question_url']; ?></a></div> 
			   <div style = "float:left;top:5px;">
			   <div style ="float:left; width:110px;left:-50px;">浏览数:<?php echo $val['view_count']; ?></div>
			   <div style ="float:left; width:110px">关注数:<?php echo $val['focus_count']; ?></div>
			   <div style ="float:left; width:110px">评论数:<?php echo $val['answer_count']; ?></div>
			   </div>
			 	
			 </div>
			 	
			 	<!-- 回复开始 -->
				<?php if ($val['associate_action'] == ACTION_LOG::ANSWER_QUESTION OR $val['associate_action'] == ACTION_LOG::ADD_AGREE) { ?>
			    <div class="s_txt i_prl">
			    	<p class="s_endorsepeople i_gray i_cl_02 i_hide"> 
			            <span class="g_txt">赞同来自:</span> 
			            <?php if ($val['answer_info']['agree_users']) { ?>
							<?php $count = 0;
							foreach ($val['answer_info']['agree_users'] as $uid => $user) { ?>
								<a href="people/<?php echo $user['url_token']; ?>" data-id="<?php echo $uid;?>" class="a user_msg" data-message="&uid=<?php echo $uid;?>&card=user" name="agee_people"><?php echo $user['user_name']; ?></a><?php if (count($val['answer_info']['agree_users'])!= ++$count) { ?><em>、</em><?php } ?>
							<?php } ?>
						<?php } ?>
			           <!-- <a class="v_more " href="javascript:;">更多 »</a>-->
			        </p>
				    
				   
				      	<div id="detail_<?php echo $val['history_id']; ?>" class="i_cl_01">
				      		
				      		<p class="s_autograph i_gltxtHide"><a href="people/<?php echo $val['answer_info']['url_token']; ?>"><?php echo $val['answer_info']['user_name']; ?></a><?php if ($val['answer_info']['signature']) { ?> - <?php echo $val['answer_info']['signature']; ?><?php } ?></p>
				      		
				      		<div class="tags_Mark i_cl_01 i_lineHeight">
				      		<?php echo nl2br(cjk_substr($val['answer_info']['answer_content'], 0, 130, 'UTF-8', '...')); ?>
				      		<?php if (cjk_strlen($val['answer_info']['answer_content']) > 130) { ?>
				        	<a href="javascript:;" class="showMore" onclick="content_switcher($('#detail_<?php echo $val['history_id']; ?>'), $('#detail_more_<?php echo $val['history_id']; ?>'));">显示全部 »</a>
				        	<?php } ?>
				        	</div>
							<?php if ($val['answer_info']['attachs']) { ?>
								<div class="q_con_imgs i_alpHover" style="padding-top:6px;">
								  <?php foreach($val['answer_info']['attachs'] AS $t_key => $t_val) { ?>
								  <?php if ($t_val['is_image']): ?>
								  <a href="javascript:;" onclick="content_switcher($('#detail_<?php echo $val['history_id']; ?>'), $('#detail_more_<?php echo $val['history_id']; ?>')); return false;"><img src="<?php echo $t_val[thumb]; ?>" alt="" /></a>
								  <?php else: ?>
								  <p class="q_accessory"><a href="<?php echo download_url($t_val['file_name'], $t_val['attachment']); ?>" class="i_gltxtHide"><em class="q_ico"></em><?php echo $t_val['file_name']; ?></a></p>
								  <?php endif; ?>
								  <?php } ?>
								</div>
							<?php } ?>
							<!-- 显示附件小图 END -->
							
				        </div>
				   
				    <div class="i_cl_01 " style="display:none" id="detail_more_<?php echo $val['history_id']; ?>">
				    	<?php if ($val['answer_info']['uid'] != $val['user_info']['uid']) { ?>
				    	<p class="s_autograph i_gltxtHide"><a href="people/<?php echo $val['answer_info']['url_token']; ?>"><?php echo $val['answer_info']['user_name']; ?></a><?php if ($val['answer_info']['signature']) { ?> - <?php echo $val['answer_info']['signature']; ?><?php } ?></p>
				    	<?php } ?>
				    	<div class="tags_Mark i_cl_01 i_lineHeight">
					    <?php echo nl2br($val['answer_info']['answer_content']); ?>
					    
						<!-- 显示附件大图(回复站点) -->
						<?php if ($val['answer_info']['attachs']) { ?>
							<div class="picTrueD">
								<div class="aScue listPicTrueBig">
								<?php foreach($val['answer_info']['attachs'] AS $t_key => $t_val) { ?>
								<?php if ($t_val['is_image']): ?>
								<a href="<?php echo $t_val['attachment']; ?>" target="lightbox" data-fancybox-group="thumb" rel="lightbox"><img src="<?php echo $t_val['attachment']; ?>" alt="" /></a>
								<?php else: ?>
								<p><a href="<?php echo download_url($t_val['file_name'], $t_val['attachment']); ?>" class="file_ico"><?php echo $t_val['file_name']; ?></a></p>
								<?php endif; ?>
								<?php } ?>
								</div>
							</div>
						<?php } ?>
						<!-- 显示附件大图(回复站点) END -->
			            </div>
					</div>
					    		
			        <!--这里是新增的_start-->
                    <div class="sC_dgar">
                       <a href="javascript:;" onclick="ajax_request(G_BASE_URL + '/favorite/ajax/remove_favorite_item/', 'answer_id=' + <?php echo $val['answer_info']['answer_id']; ?>);" class="i_cl_02 i_right i_gray_but">取消收藏</a>&nbsp;&nbsp;&nbsp;&nbsp;<span id="i_PublicTopic<?php echo $val['answer_info']['answer_id']; ?>" class="q_topicMuster">
                            <?php if ($this->favorite_items_tags[$val['answer_info']['answer_id']]) { ?>
                            <?php foreach ($this->favorite_items_tags[$val['answer_info']['answer_id']] AS $f_key => $f_val) { ?>
                            <span class="i_glotopic" data-text="<?php echo $f_val['title']; ?>"><?php echo $f_val['title']; ?></span>
                            <?php } ?>
                            <?php } ?>
                        </span>
                        <span id="editor_topicBtns" onclick="$.topic.editor_topic({flg:this,make:false,answer_id:<?php echo $val['answer_info']['answer_id']; ?>});" title="标签编辑" class="q_editor i_small">标签编辑</span>	
                                                                              <!--这里需要传一个参数question_id:2259 此站点的id-->
            		</div>
                    <!--新增_end-->
			        
					<a class="s_endorse i_pas" href="javascript:;" onClick="$.I.click_eve({flg:this,appNum:<?php echo $val['answer_info']['agree_count']; ?>,uid:G_USER_ID,username:G_USER_NAME,ready:<?php echo $val['answer_info']['agree_status']; ?>,answer_id:<?php echo $val['answer_info']['answer_id']; ?>});"><?php echo $val['answer_info']['agree_count']; ?></a>
			        <!--flg:自身，appNum:赞同数，uid：跟用户名对应的id ,username：用户名，ready：是否已赞或者反对过该站点{1：为已赞同过的，-1：已经反对过的，0：为未没操作过} -->
			    </div>
				<?php } ?>
				<!-- 回复-结束 --> 	
			</div>
			<!--内容模块_e--> 
			<?php } ?>
			</div>
			<?php } else { ?>
			<p align="center" style="padding: 15px 0">没有内容</p>
			<?php } ?>
        <!--我的收藏_e-->
        </div>
        
        <?php echo $this->pagination; ?>
	</div>

    <div class="R_sidebar i_index">

		<!--公告_s-->
		<?php TPL::output('block/sidebar_announce.tpl.htm'); ?>	
		<!--公告_s-->

		<?php TPL::output('block/sidebar_menu.tpl.htm'); ?>	
		
		<div class="i_rightMain">
        <!--邀请好友加入社区-->
        <p class="unityjoin">邀请好友加入社区<?php if ($this->user_info['invitation_available']) { ?><em class="i_message_tooltip_s"><?php echo $this->user_info['invitation_available']; ?></em><?php } ?> <a href="invitation/" class="i_green_but" title="发送邀请 »">发送邀请</a> </p>
        
        <!-- 边栏可能感兴趣的人或标签 -->
		<?php TPL::output('block/sidebar_recommend_users_topics.tpl.htm'); ?>
      </div>
    </div>
  </div>

<?php TPL::output('global/footer.tpl.htm'); ?>